The query interface of a Controller provides access to timeline status information, text slot contents, etc. for custom web pages.
If you GET
the URL:
http://xxx.xxx.xxx.xxx/query/command[?args]
and command
and args
are recognised, the controller will return the result of the query, else, it will return a 204 (No Response) HTTP header.
Data will be returned as XML. Recognised commands are:
system
currentTime
timeline
timelineStatus
textSlot
variable
Get a summary of the Controller's settings.
system
none
<response> <hardwareType>LPC2</hardwareType> <serialNumber>002056</serialNumber> <firmwareVersion> <major>1</major> <minor>7</minor> <point>133</point> </firmwareVersion> <networkInterface> <ipAddress>172.20.1.9</ipAddress> <subnetMask>255.255.0.0</subnetMask> <gateway>172.20.0.250</gateway> </networkInterface> <cfCardSizeKb>1024</cfCardSizeKb> <date>2010-04-23</date> <time>08:59:14</time> <sunrise>06:55:00</sunrise> <sunset>19:02:00</sunset> <projectName>My First Show</projectName> <projectAuthor>Joe Bloggs</projectAuthor> <projectUuid>00000000-0000-0000-0000-000000000000</projectUuid> <projectUploadDate>2010-04-21T13:36:18</projectUploadDate> <controllerNumber>1</controllerNumber> </response>
<date>
, <time>
, <sunrise>
and <sunset>
are in local time.
LPC X will have a <networkInterface2>
tag with the network details of the second interface.
AVC will not have a <projectUploadDate>
tag.
Get a time and date from the Controller's system clock in local time.
currentTime
none
<response> <currentTime> <date>2002-05-30</date> <time>09:00:00</time> </currentTime> </response>
Get a list of timelines in the project. id
is the timeline number.
timeline
id=1 / id=1,3,5 / id=1-5 / id=1-3,5,8-10 (optional, defaults to ALL)
<response> <timeline id = "1"> <name>My First Timeline</name> <length>P00H30M00.00S</length> <timeSource> <type>Timecode</type> <bus>2</bus> </timeSource> <timeOffset>P00H00M00.00S</timeOffset> <timeFormat>SMPTE30</timeFormat> </timeline> <timeline id = "3"> ... </timeline> </response>
Gets the current status of timelines in the project. id is the timeline number.
timelineStatus
id=1 / id=1,3,5 / id=1-5 / id=1-3,5,8-10 (optional, defaults to ALL)
<response> <timelineStatus id = "1"> <playState>Running</playState> <position>P00H14M03.50S</position> <onStage>true</onStage> </timelineStatus> <timelineStatus id = "3"> <playState>Released</playState> </timelineStatus> </response>
Valid values for <playState>
are:
Running
Halted
Held at end
Released
Idle
Get a list of text slots in the project, along with their current values.
textSlot
slot_name (optional, defaults to ALL)
<response> <textSlot name = "slot_name">slot value</textSlot> </response>
Multiple text slots can be requested by adding multiple query arguments, for example:
GET http://xxx.xxx.xxx.xxx/query/textSlot?slot1&slot2&slot3
If a slot name is not recognised, it will be ignored.
Get the value of a global Lua variable.
variable
variable_name (required)
<response> <variable name = "variable_name">variable value</variable> </response>
Multiple variables can be requested by adding multiple query arguments, for example:
GET http://xxx.xxx.xxx.xxx/query/variable?variable1&variable2&variable3
If a variable name is not recognised, or if the variable's value cannot be represented as text, the <variable>
tag will contain no value.
If a variable name is a Lua table it will be returned in an XML format as follows:
<response> <variable name="variable1"> <variable name="1a">value 1a</variable> <variable name="1b">value 1b</variable> </variable> <variable name="variable2">value 2</variable> ... </response>
An example file can be found here.